package com.weipai.springboot.module.mapper;

import com.weipai.springboot.model.OrderSublist;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface OrderSublistMapper {
    int deleteByPrimaryKey(String orderSublistId);

    int insert(OrderSublist record);

    int insertSelective(OrderSublist record);

    OrderSublist selectByPrimaryKey(String orderSublistId);

    int updateByPrimaryKeySelective(OrderSublist record);

    int updateByPrimaryKey(OrderSublist record);

    List<Map<String, Object>> getOrderSublist(@Param("orderNumber") String orderNumber);

    int deleteByOrderNumber(@Param("orderNumber") String orderNumber);

    int insertSubOrderList(List<OrderSublist> subOrderList);

    //获取子订单中的基本信息
    List<Map<String,Object>> getSublistByOrderNumber(String orderNumber);
    
    //通过 goodsId ,orderNumber 获得子订单
    OrderSublist getOrderSublistByGoodsIdAndOrderNumber(@Param("orderNumber")String orderNumber, @Param("goodsId")String goodsId);

    //根据订单号获得子订单的信息
    List<Map<String,Object>> getSublist(String orderNumber);

}